| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | /** global: GLSR, jQuery */ |
||
| 47 | postFromEvent_: function( callback ) { // Event, function|void |
||
| 48 | this.event.preventDefault(); |
||
| 49 | var el = $( this.event.target ); |
||
| 50 | if( el.is( ':disabled' ))return; |
||
| 51 | el.prop( 'disabled', true ); |
||
| 52 | $.post( GLSR.ajaxurl, this.buildData_( el ), function( response ) { |
||
| 53 | if( typeof callback === 'function' ) { |
||
| 54 | callback( response ); |
||
| 55 | } |
||
| 56 | el.prop( 'disabled', false ); |
||
| 57 | }); |
||
| 58 | }, |
||
| 59 | }; |
||
| 61 |